//
//  BUPangleAdTools.h
//  速睡
//
//  Created by 王亮 on 2020/10/26.
//  Copyright © 2020 shushui. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef enum : NSUInteger {
    Ad_Close_Type_Normal,
    Ad_Close_Type_Sure,
    Ad_Close_Type_Close,
    Ad_Close_Type_Error,
} Ad_Close_Type;


/** 开屏广告 */
typedef void(^initAdEndBlock)(Ad_Close_Type type);
/** 插屏广告 */
typedef void(^initSlugAdEndBlock)(Ad_Close_Type type);
/** 激励视频 */
typedef void(^initInitiateVideoAdEndBlock)(Ad_Close_Type type);

@interface BUPangleAdTools : NSObject
+ (instancetype) singletonMod;

#pragma mark -- 插屏广告操作
/** 现实控制器 */
@property (strong, nonatomic) UIViewController *slugViewController;
/** 展示插屏广告 */
-(void)showSlugAdBlock:(initSlugAdEndBlock)initSlugAdEndBlock FromVc:(UIViewController *)fromVc;
@property (nonatomic,copy) initSlugAdEndBlock initSlugAdEndBlock;

#pragma mark -- 激励视频
/** 展示激励视频 */
-(void)showInitiateVideoAdBlock:(initInitiateVideoAdEndBlock)initInitiateVideoAdEndBlock FromVc:(UIViewController *)fromVc;
@property (nonatomic,copy) initInitiateVideoAdEndBlock initInitiateVideoAdEndBlock;


#pragma mark -- 开屏广告操作
/** 显示开平广告 */
- (void)showOpenAd;

/** 广告操作结果回调 */
@property (nonatomic,copy) initAdEndBlock initAdEndBlock;
-(void)setAdEndBlock:(initAdEndBlock)initAdEndBlock;


/** 现实控制器 */
@property (strong, nonatomic) UIViewController *rootViewController;
/** 现实的广告视图 */
@property (strong, nonatomic) UIView *showAdView;


#pragma mark -- APP 后台逻辑
/** 进入后台的时间 */
@property (strong, nonatomic) NSDate *backgroundDate;
/** App 进入后台 */
-(void)AdAppBackground;
/** App 进入前台 */
-(void)AdAppShow;

@end

